var appStatus = [
    {
        name:"simple",
        url:"/simple",
        templateUrl:"html/simple/simple-config.html",
        controller:"simpleConfigCtrl",
        label:"简单页面的爬虫配置"
    },
    {
        name:"create",
        url:"/create",
        templateUrl:"html/createpagehtml/create-config.html",
        controller:"createConfigCtrl",
        label:"js生成页面的配置"
    },
    {
        name:"task",
        url:"/task",
        templateUrl:"html/task/crawler-task.html",
        controller:"crawlerTaskCtrl",
        label:"爬虫任务页面"
    }
];
angular.module("crawlerApp",["ui.router"]).config(function($locationProvider,$urlRouterProvider,$stateProvider){
     for(var i in appStatus){
         $stateProvider.state(appStatus[i])
     }
     $urlRouterProvider.when("","simple");//默认打开的视图
}).controller("indexCtrl",function($scope,$state){
    console.log("indexCtrl");
    $scope.sideMenuCode = "simple";
    $scope.clickSideMenu = function(name){
        $scope.sideMenuCode = name;
        $state.go(name)

    }
});